package com.link.base.base.wechat.service;

import com.link.base.base.wechat.model.AutoReply;
import com.link.base.base.wechat.model.AutoReplys;
import com.link.base.wechat.basic.model.InputMessage;
import com.link.core.basic.service.BasicService;

import java.util.Map;

/**
 * 自动回复接口
 *
 * @author lujiang
 * @date 2018/05/01
 */
public interface AutoReplyService extends BasicService<AutoReply> {

    /**
     * 查询自动回复内容，根据回复规则名称进行模糊查询
     *
     * @author lujiang
     * @date 2018/05/01
     * @param autoReply
     * @return
     */
    Map<String, Object> queryautoReply(AutoReply autoReply) throws Exception;

    /**
     * 新建自动回复（insert(key) insert(content) insert(rule_mode)）
     *
     * @author lujiang
     * @date 2018/05/01
     * @param autoReplys
     * @return
     */
    Map<String, Object> insertAutoReply(AutoReplys autoReplys) throws Exception;

    /**
     * 删除自动回复
     *
     * @author lujiang
     * @date 2018/05/01
     * @param id
     * @return
     */
    Map<String, Object> deleteAutoReply(Long id) throws Exception;

    /**
     * 查看某条自动回复
     *
     * @author lujiang
     * @date 2018/05/01
     * @param id
     * @return
     */
    Map<String, Object> queryAutoReplyById(Long id) throws Exception;

    /**
     * 修改某条自动回复（update(key) update(content) update(rule_mode)）
     *
     * @author lujiang
     * @date 2018/05/01
     * @param autoReplys
     * @return
     */
    Map<String, Object> updateAutoReplyById(AutoReplys autoReplys) throws Exception;

    /**
     * 回调处理
     *
     * @author lujiang
     * @date 2018/05/01
     * @param inputMsg
     * @return
     */
    String processWxRequest(InputMessage inputMsg) throws Exception;
}
